{extend name="public/common"}
{block name="body"}
<title>基本设置</title>
</head>
<body>

<div class="page-container">
   
    <div class="dataTables_wrapper" style="padding-bottom:0;">
        <div id="tab-system-total"  class="HuiTab">
            <div class="tabCon">
                <div class="mt-20">
                   
                   <div style='margin-top:20px;'>
                   
                    <form action="" enctype="application/x-www-form-urlencoded" method="post" class="l"  style="margin-left:20px;">区间查询：
                        <input required type="text" id="sDate1" name="sDate1" value="{$time.0|date='Y-m-d',###}" onfocus="WdatePicker({maxDate:'%y-%M-%d'})" class="input-text Wdate" style="width:120px;margin-right:5px;">
                        <input required type="text" id="sDate2" name="sDate2" value="{$time.1|date='Y-m-d',###}" onfocus="WdatePicker({maxDate:'%y-%M-%d'})" class="input-text Wdate" style="width:120px;margin-right:10px;">
                         <input type="text" name="us_sql" id="us_sql" placeholder="账号" style="width:140px" class="input-text" value="">
                        <button class="btn btn-success" type="submit" style="margin-right:20px;"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
                        （默认为近30天的存取记录）
                    </form>
                    <button class="btn btn-success" type="button" onclick="downExcel()" style="margin-right:20px;"><i class="Hui-iconfont">&#xe640;</i> 下载报表</button>
                    <table class="table table-border table-bordered table-bg table-hover table-sort table-responsive">
                        <thead>
                        <tr class="text-c">
                            <th>会员账号</th>
                            <th>会员姓名</th>
                            <th>手机号</th>
                            <th>锁定</th>
                            <th>会员等级</th>
                            <th>注册时间</th>
                            <th>最后登录/IP</th>
                            <th>登录次数</th>
                            <th>存款次数</th>
                            <th>存款总额</th>
                            <th>最大存款</th>
                            <th>提款次数</th>
                            <th>提款总额</th>
                            <th>最大提款</th>
                            <th>盈利</th>
                        </tr>
                        </thead>
                        <tbody>
                        {foreach($list as $v)}
                        <tr class="text-c">
                            <td>{$v.username}</td>
                            <td>{$v.bankren}</td>
                            <td>{$v.mobile}</td>
                            <td>{if($v.open==1)}关{else/}开{/if}</td>
                            <td>{$v.class_name}</td>
                            <td>{$v.reg_time|date="Y-m-d",###}</td>
                            <td>
                            {if(!$v.login_ip)}
                            {$v.reg_time|date="Y-m-d H:i:s",###}/{$v.reg_ip}
                            {else/}
                            {$v.login_time|date="Y-m-d H:i:s",###}/{$v.login_ip}
                            {/if}
                            </td>
                            <td>{$v.login_num|default=0}</td>
                            <td>{$v.cz_num|default=0}</td>
                            <td>{$v.czzje|default=0}</td>
                            <td>{$v.maxcz|default=0}</td>
                            <td>{$v.tx_num|default=0}</td>
                            <td>{$v.txzje|default=0}</td>
                            <td>{$v.maxtx|default=0}</td>
                            <td>{$v.je-$v.czzje|sprintf="%.2f",###}</td>
                        </tr>
                        {/foreach}
                        
                        </tbody>
                    </table>
                    <div class="dataTables_paginate paging_simple_numbers" style="width:100%;">
                        <span style="float:right;margin-left:-2px;">总共{$list->lastPage()}页  当前第{$list->currentPage()}页 ，共{$list->total()}条</span>
                        <div style="float:left;">{$list->render()}</div>
                    </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


{/block}
{block name="js"}
<script type="text/javascript" src="__SYSMET__/common.js"></script>
<script type="text/javascript" src="__SYSMET__/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript">
    $(function() {
        $("#tab-system-total").Huitab({
            index: 0
        });
    });
    /*查看存取记录*/
    function showDetail( lab,url ){
        parent.showDetails(url,lab,'80%','80%');
    }
    function downExcel(){
    var time1=$("#sDate1").val();
    var time2=$("#sDate2").val();
    location.href = '{:url('statistics/downExcel')}'+"?start="+time1+"&end="+time2;
}
</script>
{/block}
